package com.hujiheng.paike.service.impl;

import com.hujiheng.paike.mapper.ClassCourseMapper;
import com.hujiheng.paike.pojo.ClassCourse;
import com.hujiheng.paike.service.ClassCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassCourseServiceImpl implements ClassCourseService {
    @Autowired
    private ClassCourseMapper classCourseMapper;

    @Override
    public List<ClassCourse> getClassCourseByClassId(int classId) {
        return classCourseMapper.getClassCourseByClassId(classId);
    }

    @Override
    public List<ClassCourse> getClassCourseByTeacherId(int teacherId) {
        return classCourseMapper.getClassCourseByTeacherId(teacherId);
    }

    @Override
    public int add(ClassCourse classCourse) {
        return classCourseMapper.add(classCourse);
    }

    @Override
    public ClassCourse getClassCourseByDayAndSection(int whichDay, int whichSection, int classId) {
        return classCourseMapper.getClassCourseByDayAndSection(whichDay, whichSection, classId);
    }

    @Override
    public int update(ClassCourse classCourse) {
        return classCourseMapper.update(classCourse);
    }
}
